package cn.hnucm.userservice.service.impl;

import cn.hnucm.userservice.mapper.TbTokenMapper;
import cn.hnucm.userservice.entity.TbToken;
import cn.hnucm.userservice.service.TbTokenService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * <p>
 * 系统用户Token 服务实现类
 * </p>
 *
 * @author zjl
 * @since 2021-12-08
 */
@Service
public class TbTokenServiceImpl implements TbTokenService {

    @Autowired
    private TbTokenMapper tbTokenMapper;
    @Override
    public List<TbToken> findTbTokenById(int userId) {
        return tbTokenMapper.findTbTokenById(userId);
    }

    @Override
    public boolean addTbToken(TbToken tbToken) {
        return tbTokenMapper.addTbToken(tbToken);
    }

    @Override
    public boolean updateTbToken(TbToken tbToken) {
        return tbTokenMapper.updateTbToken(tbToken);
    }

    @Override
    public boolean deleteTbToken(int userId) {
        return tbTokenMapper.deleteTbToken(userId);
    }
}
